#!/bin/sh
#
# All Rights Reserved.
#

if [ "$1" = "clean" ] ; then
    rm -f transcript *.wlf core* *.log workingExclude.cov
    rm -rf work
    exit 0
fi

if [ "$1" != "run" ] ; then
    echo ""
    echo "### Help/Usage ..................... do.sh"
    echo "### Run example .................... do.sh run"
    echo "### Clean directory ................ do.sh clean"
    echo ""
fi

# The rest of the script is "run"
testname=SumadorParam_TB
incdir=/home/ricardo/Documentos/DisElecDig/HausaufgabeEin/Vier
rm -rf work
vlib work
if [ $? -ne 0 ]; then
    echo "ERROR: Couldn't run vlib. Make sure \$PATH is set correctly."
    exit 0
fi
vlog -v -vopt $testname.v #$testname.v $testname.v
#vlog -incr +incdir+${incdir}
#vlog -incr +incdir+${incdir} ${plus_define} -sv -vopt  -work ${incdir}/work
#vlog -incr +incdir+${incdir} -f ${incdir}/work -work ${incdir}work
echo ""
echo "### NOTE: Running $testname example ..."
echo ""

vsim -novopt work.SumadorParam_TB #-do sim.do

#vrun 
exit 0
